package com.ljc.controller;

import com.ljc.dto.Result;
import com.ljc.entity.ProjectPlanningReview;
import com.ljc.service.ProjectPlanningReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@CrossOrigin
@ResponseBody
@RequestMapping("projectPlanningReview")
public class ProjectPlanningReviewController {

    @Autowired
    private ProjectPlanningReviewService projectPlanningReviewService;

    @RequestMapping("getByProjectPlanningId")
    public Result getByProjectPlanningId(@RequestParam int projectPlanningId) {
        Result result = new Result();
        List<ProjectPlanningReview> projectPlanningReviews = projectPlanningReviewService.getByProjectPlanningId(projectPlanningId);
        result.setMsg("获取审核记录成功").setStatus(1).setData(projectPlanningReviews);
        return result;
    }

}
